package com.hw.job_4;

import java.util.List;

// 学生工具类
public class StudentTool {

    // 判断是否包含学生
    public static boolean isExistStudent(List<Student> stArr, Student newSt) {
        if (stArr.isEmpty()) { return false; }
        boolean isExist = false;
        for (Student aSt: stArr) {
            if (aSt.equals(newSt)) {
                isExist = true;
                break;
            }
        }
        return isExist;
    }
}
